package appdemo;

/**
 * appdemo.BusinessService
 *
 * @author cyril
 * @date 2022/3/9 12:23 上午
 * <p>
 * 日进一寸 日拱一卒
 */
public class BusinessService {

    public void doSth1() {
        System.out.println("执行业务1。。。");
        try {
            // 随机睡眠 1-3 秒
            Thread.sleep((long)(Math.random() * 1_000 + 3_000));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public void doSth2() {
        System.out.println("执行业务2。。。");
        try {
            // 随机睡眠 1-3 秒
            Thread.sleep((long)(Math.random() * 1_000 + 3_000));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
